package pt.mleiria.core.mother;

import pt.mleiria.utils.EnvSettings;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.alicebot.ab.Bot;
import org.alicebot.ab.Chat;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author manuel
 */
public class Mother {
    
    public final Bot bot;
    private final String botName;
    private final String path;
    private final Chat chatSession;

    public Mother() {
        this.botName = "mother";
        this.path = EnvSettings.ADALINE_PROCESS_DIR;
        bot = new Bot(botName, path);
        chatSession = new Chat(bot);
    }

    public String sendRequest(final String request){
        Logger.getLogger(Mother.class.getName()).log(Level.INFO, "[request:]" + request);
        
        return chatSession.multisentenceRespond(request);
    }
    
    
    
    public static void main(String[] args){
        Mother mother = new Mother();
        Chat chatSession = new Chat(mother.bot);
        String request = "tudo bem mother";
        String response = chatSession.multisentenceRespond(request);
        System.out.println("Mother:" + response);
        
        request = "How are you?";
        response = chatSession.multisentenceRespond(request);
        System.out.println("Mother:" + response);
    }

}
